package com.cqhfan.pojo.content.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.cqhfan.core.constans.DateConstants;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author 眭传洪
 * @create 2025-08-01 0:17
 */
@Data
public class WorksVO {

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    // 标题
    private String title;

    // 内容
    private String description;

    // 作者
    @JsonSerialize(using = ToStringSerializer.class)
    private Long author;

    // 昵称
    private String nickName;

    // 头像
    private String avatar;

    // 点赞数量
    private Integer likeQuantity;

    // 是否点赞
    private Boolean ifLiked;

    // 评论数
    private Integer commentQuantity;

    // 收藏数
    private Integer collectQuantity;

    // 是否收藏
    private Boolean ifCollect;

    // 转发数
    private Integer forwardQuantity;

    // 话题
    private String topic;

    // 是否关注
    private Boolean ifFollow;

    // 作品内容信息
    private List<String> worksContents;

    // 发布时间
    @JsonFormat(pattern = DateConstants.DATE_TIME_FORMAT)
    private LocalDateTime publishTime;

}
